package data;

import gui.toolpanels.CFile;

import java.util.ArrayList;

import utils.Utils;



public class Files extends ArrayList<CFile> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Files()
	{
		super();
	}
	
	public boolean containsFile(String filename)
	{
		for(CFile f : this)
		{
			if(f.name.equals(filename)) return true;
		}
		return false;
	}
	
	public CFile getFile(String filename)
	{
		for(CFile f : this)
		{
			if(f.name.equals(filename)) return f;
		}
		return null;
	}
	
	public void printList()
	{
		for(CFile f : this)
		{
			Utils.out(f.name+" "+f.size+" "+f.modified.toString()+" "+f.isDir);
		}
	}
}
